<template>
  <div>
    <uni-row>
      <uni-forms class="form" label-width="200">
        <uni-row :gutter="10">
          <uni-col>
            <uni-title :title="feed.batchNumber" type="h1"></uni-title>
          </uni-col>
          <uni-col :xs="12" :sm="8">
            <uni-forms-item label-align="right" label="年份 : " name="yearsMonth">
              <uni-title :title="feed.yearsMonth"></uni-title>
            </uni-forms-item>
          </uni-col>
          <uni-col :xs="12" :sm="8">
            <uni-forms-item label-align="right" label="日期 : " name="dateForDay">
              <uni-title :title="feed.dateForDay"></uni-title>
            </uni-forms-item>
          </uni-col>
          <uni-col :xs="12" :sm="8">
            <uni-forms-item label-align="right" label="车间 : " name="deptName">
              <uni-title :title="feed.deptName"></uni-title>
            </uni-forms-item>
          </uni-col>
          <uni-col :xs="12" :sm="8">
            <uni-forms-item label-align="right" label="养虫间 : " name="roomName">
              <uni-title :title="feed.roomName"></uni-title>
            </uni-forms-item>
          </uni-col>
          <uni-col :xs="12" :sm="8">
            <uni-forms-item label-align="right" label="类型 : " name="bugType">
              <uni-title :title="feed.bugType"></uni-title>
            </uni-forms-item>
          </uni-col>
          <uni-col :xs="12" :sm="8">
            <uni-forms-item label-align="right" label="挑虫日期 : " name="optionMonth">
              <uni-title :title="feed.optionMonth"></uni-title>
            </uni-forms-item>
          </uni-col>
          <uni-col :xs="12" :sm="8">
            <uni-forms-item label-align="right" label="轮次 : " name="round">
              <uni-title :title="feed.round"></uni-title>
            </uni-forms-item>
          </uni-col>
          <uni-col :xs="12" :sm="8">
            <uni-forms-item label-align="right" label="周期 : " name="period">
              <uni-title :title="feed.period !='0' ? '26天' : '28天'"></uni-title>
            </uni-forms-item>
          </uni-col>

          <uni-col :xs="12" :sm="8">
            <uni-forms-item label-align="right" label="本次换料时间" name="reloadDay">
              <uni-title :title="feed.reloadDay"></uni-title>
            </uni-forms-item>
          </uni-col>
          <uni-col :xs="24" :sm="12">
            <uni-forms-item label-align="right" label="饲料批号">
              <uni-title :title="feed.feedBatchNumber"></uni-title>
            </uni-forms-item>
          </uni-col>
          <uni-col :xs="12" :sm="8">
            <uni-forms-item label-align="right" label="下次换料时间" name="nextReloadDay">
              <uni-title :title="feed.nextReloadDay"></uni-title>
            </uni-forms-item>
          </uni-col>
          <uni-col :xs="12" :sm="8">
            <uni-forms-item label-align="right" label="灭活数量 : " name="killNum">
              <uni-title :title="feed.killNum"></uni-title>
            </uni-forms-item>
          </uni-col>
          <uni-col>
            <uni-title title="正常饲养换料" type="h1"></uni-title>
          </uni-col>
          <uni-col :xs="12" :sm="8">
            <uni-forms-item label-align="right" label="换虫数量 : " name="changeNum">
              <uni-title :title="feed.changeNum"></uni-title>
            </uni-forms-item>
          </uni-col>
          <uni-col :xs="12" :sm="8">
            <uni-forms-item label-align="right" label="剩余数量 : " name="residue">
              <uni-title :title="feed.residue"></uni-title>
            </uni-forms-item>
          </uni-col>
          <uni-col :xs="12" :sm="8">
            <uni-forms-item label-align="right" label="僵虫数量 : " name="stiffNum">
              <uni-title :title="feed.stiffNum"></uni-title>
            </uni-forms-item>
          </uni-col>
          <uni-col :xs="12" :sm="8">
            <uni-forms-item label-align="right" label="轮僵化率 : " name="roundStiff">
              <uni-title :title="feed.roundStiff"></uni-title>
            </uni-forms-item>
          </uni-col>
          <uni-col :xs="12" :sm="8">
            <uni-forms-item label-align="right" label="成蛹数量 : " name="pupaNum">
              <uni-title :title="feed.pupaNum"></uni-title>
            </uni-forms-item>
          </uni-col>
          <uni-col :xs="12" :sm="8">
            <uni-forms-item label-align="right" label="轮蛹化率 : " name="roundPupa">
              <uni-title :title="feed.roundPupa"></uni-title>
            </uni-forms-item>
          </uni-col>
          <uni-col :xs="12" :sm="8">
            <uni-forms-item label-align="right" label="特殊转虫数量" name="specialChange">
              <uni-title :title="feed.specialChange"></uni-title>
            </uni-forms-item>
          </uni-col>
          <uni-col :xs="12" :sm="8">
            <uni-forms-item label-align="right" label="死亡数量 : " name="deathNum">
              <uni-title :title="feed.deathNum"></uni-title>
            </uni-forms-item>
          </uni-col>
          <uni-col :xs="12" :sm="8">
            <uni-forms-item label-align="right" label="轮死亡率 : " name="roundDeath">
              <uni-title :title="feed.roundDeath"></uni-title>
            </uni-forms-item>
          </uni-col>


          <uni-col :xs="12" :sm="8">
            <uni-forms-item label-align="right" label="转入车间 : ">
              <uni-title :title="changeDepts.filter(it=>it.value === feed.changeDeptId)[0].title"></uni-title>
            </uni-forms-item>
          </uni-col>
          <uni-col :xs="12" :sm="8">
            <uni-forms-item label-align="right" label="转入房间 : ">
              <uni-title :title="changeRooms.filter(it=>it.value === feed.changeRoomId)[0].title"></uni-title>
            </uni-forms-item>
          </uni-col>


          <uni-col>
            <uni-title title="隔离饲养换料" type="h1"></uni-title>
          </uni-col>
          <uni-col :xs="12" :sm="8">
            <uni-forms-item label-align="right" label="换虫数量 : " name="glChangeNum">
              <uni-title :title="feed.glChangeNum"></uni-title>
            </uni-forms-item>
          </uni-col>
          <uni-col :xs="12" :sm="8">
            <uni-forms-item label-align="right" label="剩余数量 : " name="glResidue">
              <uni-title :title="feed.glResidue"></uni-title>
            </uni-forms-item>
          </uni-col>
          <uni-col :xs="12" :sm="8">
            <uni-forms-item label-align="right" label="僵虫数量 : " name="glStiffNum">
              <uni-title :title="feed.glStiffNum"></uni-title>
            </uni-forms-item>
          </uni-col>
          <uni-col :xs="12" :sm="8">
            <uni-forms-item label-align="right" label="轮僵化率 : " name="glRoundStiff">
              <uni-title :title="feed.glRoundStiff"></uni-title>
            </uni-forms-item>
          </uni-col>
          <uni-col :xs="12" :sm="8">
            <uni-forms-item label-align="right" label="成蛹数量 : " name="glPupaNum">
              <uni-title :title="feed.glPupaNum"></uni-title>
            </uni-forms-item>
          </uni-col>
          <uni-col :xs="12" :sm="8">
            <uni-forms-item label-align="right" label="轮蛹化率 : " name="glRoundPupa">
              <uni-title :title="feed.glRoundPupa"></uni-title>
            </uni-forms-item>
          </uni-col>
          <uni-col :xs="12" :sm="8">
            <uni-forms-item label-align="right" label="死亡数量 : " name="glDeathNum">
              <uni-title :title="feed.glDeathNum"></uni-title>
            </uni-forms-item>
          </uni-col>
          <uni-col :xs="12" :sm="8">
            <uni-forms-item label-align="right" label="轮死亡率 : " name="glRoundDeath">
              <uni-title :title="feed.glRoundDeath"></uni-title>
            </uni-forms-item>
          </uni-col>


          <uni-col :xs="12" :sm="8">
            <uni-forms-item label-align="right" label="转入车间 : ">
              <uni-title :title="changeDepts.filter(it=>it.value === feed.glChangeDeptId)[0].title"></uni-title>
            </uni-forms-item>
          </uni-col>
          <uni-col :xs="12" :sm="8">
            <uni-forms-item label-align="right" label="转入房间 : ">
              <uni-title :title="glChangeRooms.filter(it=>it.value === feed.glChangeRoomId)[0].title"></uni-title>
            </uni-forms-item>
          </uni-col>
        </uni-row>
      </uni-forms>
    </uni-row>
    <uni-row v-if="feed.tableStatus == '1'">
      <button class="button success" @click="handleConfrim('0')">通过</button>
      <button class="button danger" @click="handleConfrim('2')">拒绝</button>
    </uni-row>
    <uni-popup ref="isShow" type="dialog">
      <uni-popup-dialog mode="input" :title="title" v-model="remark"
                        placeholder="请输入备注" @confirm="submit"></uni-popup-dialog>
    </uni-popup>
  </div>
</template>

<script setup lang="ts">
import {AuditFormHandle} from "../../pagesVM/audit";
import UniRow from "../../uni_modules/uni-row/components/uni-row/uni-row.vue";
import UniForms from "../../uni_modules/uni-forms/components/uni-forms/uni-forms.vue";
import UniTitle from "../../uni_modules/uni-title/components/uni-title/uni-title.vue";

const {
  title,
  isShow,
  handleConfrim,
  submit,
  remark,
    feed,
    changeRooms,
    changeDepts,
    glChangeRooms
} = AuditFormHandle()
</script>

<style scoped lang="scss">
.button {
  flex-direction: row;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: 35px;
  border-radius: 5px;
  margin: 0 5px 10px;

  .success{
    color: #4cd964;
  }

  .danger{
    color: #ce3c39;
  }

}

.form{
  width: 80%;
  font-size: 50px;
  margin: 30px auto 0 auto
}
</style>
